<?php

namespace Common\Model;
use Think\Model;

class ShanyouNotifyLogModel extends  Model
{

    public  function  setParam($param){
        $data = array();
        $data["record_id"]=$param["recordId"];
        $data["sdk_channel"]=$param["sdkChannel"];
        $data["user_id"]=$param["userId"];
        $data["task_id"]=$param["taskId"];
        $data["sdk_user_id"]=$param["sdkUserId"];
        $data["task_data_record"]=$param["taskDataRecord"];
        $data["task_data_money"]=$param["taskDataMoney"];
        $data["sdk_reward_money"]=$param["sdkRewardMoney"];
        $data["task_data_reward_money"]=$param["taskDataRewardMoney"];
        $data["notify_count"]=$param["notifyCount"];
        $data["notify_time"]=$param["notifyTime"];
        $data["project_name"]=$param["projectName"];
        $data["ratio"]=$param["ratio"];
        $data["unit"]=$param["unit"];
        $data["create_time"]=date("Y-m-d H:i:s",time());
        $data["sign"]=$param["sign"];
        $taskNotifyLogInfo = D("shanyou_notify_log")->where(array("task_data_record"=>$param["taskDataRecord"]))->find();
        if(empty($taskNotifyLogInfo)){
             D("shanyou_notify_log")->data($data)->add();
        }
        return true;
    }
}